/*
 * ItemRefineResource.h
 *
 *  Created on: 2013. 9. 9.
 *      Author: mega@gamevil.com
 */

#ifndef ITEMREFINERESOURCE_H_
#define ITEMREFINERESOURCE_H_

#include <map>
#include "../engine.h"

namespace ProjectZ { namespace NResource {

class ItemRefineData
{
public:
	struct Flyweight
	{
		int _TYPE;		// 1: 기본, 2: 1.5배, 3: 2배
		int _USE;
		int _REFINE1;
		int _REFINE2;
		int _REFINE3;
		int _REFINE4;
		int _REFINE5;
		int _REFINE6;
		int _REFINE7;
		int _REFINE8;
		int _REFINE9;
		int _REFINE10;
		int _REFINE11;
		int _REFINE12;
		int _REFINE13;
		int _REFINE14;
		int _REFINE15;
	};

public:
	ItemRefineData() {};
	virtual ~ItemRefineData();

	bool LoadResource(int company, int saleCode);
	Flyweight * GetFly(User * pUser);

private:
	void	Clear();

private:
	typedef std::map<int, Flyweight *>	DATATREE;
	DATATREE clsFlyTree;
};


class ItemRefineResource
{
public:
	ItemRefineResource();
	virtual ~ItemRefineResource();

	bool LoadResource();
	ItemRefineData::Flyweight * GetFly(User * pUser);

private:
	ItemRefineData * pItemRefineAD;
	ItemRefineData * pItemRefineIOS;
};

} /* NResource */ } /* ProjectZ */

#endif /* ITEMREFINERESOURCE_H_ */
